home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 58
/
MINAMI58.ISO
/
Varios
/
Juegos Flash
/
Gold Yard.exe
/
scripts
/
DefineSprite_324
/
frame_1
/
DoAction.as
Wrap
Text File
|
2003-04-29
|
4KB
|
160 lines
function drain(damage)
{
if(_root.gameover != 1)
{
var i = 0;
while(i < damage)
{
_root.painfx.gotoAndStop("on");
set("_root.energy:energy",eval("_root.energy:energy") - 1);
_root.energy.gotoAndStop(_root.energy._currentframe + 1);
if(eval("_root.energy:energy") < 1)
{
set("_root.energy:energy",0);
_root.library.gotoAndStop("gameover");
}
i++;
}
}
}
function heal(power)
{
_root.healingfx.gotoAndPlay("on");
if(_root.energy.energy < 100)
{
var h = 0;
while(h < power)
{
_root.energy.energy += 1;
_root.energy.prevFrame();
h++;
}
}
}
function fdepthx(x, y)
{
depthx = Number(y) + Number(x) - 60;
}
function fdepthy(x, y)
{
depthy = Number(y - x) + 300;
}
function fnewdepth(x, y)
{
newdepth = Number(int((y - 15) / 30) - int((Number(x) + 14) / 30)) + 10;
}
function down()
{
Xmove = Xincr;
Ymove = Yincr;
XPmove = 0;
YPmove = Pincr;
}
function up()
{
Xmove = - Xincr;
Ymove = - Yincr;
XPmove = 0;
YPmove = - Pincr;
}
function left()
{
Xmove = - Xincr;
Ymove = Yincr;
XPmove = - Pincr;
YPmove = 0;
}
function right()
{
Xmove = Xincr;
Ymove = - Yincr;
XPmove = Pincr;
YPmove = 0;
}
function fdirection()
{
tellTarget("_root.droid" add newdepth)
{
gotoAndStop(_root.library.direction);
}
}
function animation()
{
tellTarget("_root.droid" add depth add ".head")
{
nextFrame();
}
pointerx = Number(getProperty("_root.pointer", _X)) + Number(XPmove);
pointery = Number(getProperty("_root.pointer", _Y)) + Number(YPmove);
}
a;
"c" < (b >= undefined) || 1();
Pincr = 5;
Xincr = 4.5;
Yincr = 2.25;
antennaL = 15;
antennaW = 16;
pointerx = 195;
pointery = 165;
planex = getProperty("/roomplane", _X) - getProperty("/roomplane", _width) / 2;
planey = getProperty("/roomplane", _Y) - getProperty("/roomplane", _height) / 2;
planecelly = getProperty("/roomplane", _height) / 20;
planecellx = getProperty("/roomplane", _width) / 20;
var i = 1;
while(i < 151)
{
set("room" add i,0);
set("gotitem" add i,1);
set("targetstatus" add i,1);
i++;
}
score = 0;
_root.mapengine.level = 1;
music = 1;
_root.gameover = 0;
damage_skull = 1 * _root.difficulty_level;
damage_minighost = 2 * _root.difficulty_level;
damage_spider = 3 * _root.difficulty_level;
damage_spikes = 2 * _root.difficulty_level;
damage_thrower = 4 * _root.difficulty_level;
damage_gate = 10 * _root.difficulty_level;
damage_ghost = 1 * _root.difficulty_level;
healing_potion = int(30 / _root.difficulty_level);
healing_vial = int(10 / _root.difficulty_level);
slot = 1;
counter4 = 1;
while(Number(counter4) < 5)
{
set("slotcontent" add counter4,0);
counter4 = Number(counter4) + 1;
}
activeslot = slotcontent1;
call("activeslot");
item_name = new Array();
item_name[0] = "Empty";
item_name[1] = "Silver Key";
item_name[2] = "Green Key";
item_name[3] = "Woodman Axe";
item_name[4] = "Purple Key";
item_name[5] = "Bat Wing";
item_name[6] = "Gate Key";
item_name[7] = "Water Bucket";
item_name[8] = "Heavy Tome";
item_name[9] = "Blue Key";
item_name[26] = "Healing Potion";
item_name[27] = "Healing Potion";
item_name[28] = "Healing Potion";
item_description = item_name[0];
gotoAndPlay(3);
initial_time = new Date();
initial_month = initial_time.getMonth();
initial_date = initial_time.getDate();
initial_hours = initial_time.getHours();
initial_minutes = initial_time.getMinutes();
initial_seconds = initial_time.getSeconds();
if(initial_month == 5 and initial_date == 11)
{
_root.infomessage("Happy Birthday Francesco Maisto");
}
room = 1;